package com.yunjian.core.busi.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.yunjian.core.busi.mapper.HouseBasicInfoMapper;
import com.yunjian.core.busi.model.HouseBasicInfo;
import com.yunjian.core.busi.model.HouseBasicInfoExample;
import com.yunjian.core.busi.service.HouseBasicInfoService;
import com.yunjian.core.busi.vo.HouseBasicInfoVo;

@Service
public class HouseBasicInfoServiceImpl implements HouseBasicInfoService{
	
	//private final static Logger logger = LoggerFactory.getLogger(HouseBasicInfoServiceImpl.class);
	
	@Autowired
	private HouseBasicInfoMapper mapper;

	@Override
	public int countByExample(HouseBasicInfoExample example) {
		return mapper.countByExample(example);
	}

	@Override
	public int deleteByExample(HouseBasicInfoExample example) {
		return mapper.deleteByExample(example);
	}

	@Override
	public int deleteByPrimaryKey(String userId) {
		return mapper.deleteByPrimaryKey(userId);
	}

	@Override
	public int insert(HouseBasicInfo record) {
		return mapper.insert(record);
	}

	@Override
	public int insertSelective(HouseBasicInfo record) {
		return mapper.insertSelective(record);
	}

	@Override
	public List<HouseBasicInfo> selectByExample(HouseBasicInfoExample example) {
		return mapper.selectByExample(example);
	}

	@Override
	public HouseBasicInfo selectByPrimaryKey(String userId) {
		return mapper.selectByPrimaryKey(userId);
	}

	@Override
	public int updateByExampleSelective(HouseBasicInfo record, HouseBasicInfoExample example) {
		return mapper.updateByExampleSelective(record, example);
	}

	@Override
	public int updateByExample(HouseBasicInfo record, HouseBasicInfoExample example) {
		return mapper.updateByExample(record, example);
	}

	@Override
	public int updateByPrimaryKeySelective(HouseBasicInfo record) {
		return mapper.updateByPrimaryKeySelective(record);
	}

	@Override
	public int updateByPrimaryKey(HouseBasicInfo record) {
		return mapper.updateByPrimaryKey(record);
	}


	@Override
	public PageInfo<HouseBasicInfo> selectPagedByExample(int page, int rows,
			HouseBasicInfoExample example) {
		PageHelper.startPage(page, rows);
		PageInfo<HouseBasicInfo> pageInfo = new PageInfo<>(mapper.selectByExample(example));
		return pageInfo;
	}

	@Override
	public List<HouseBasicInfoVo> selectVoByExample(
			HouseBasicInfoExample example) {
		return null;
	}

	@Override
	public PageInfo<HouseBasicInfoVo> selectPagedVoByExample(int page,
			int rows, HouseBasicInfoExample example) {
		PageHelper.startPage(page, rows);
		PageInfo<HouseBasicInfoVo> pageInfo = new PageInfo<>(mapper.selectVoByExample(example));
		return pageInfo;
	}
	
}
